import request from '@/axios'
import type { ListParams, Response } from '@/api/api'

export interface Row {
  id?: number
}

// 分拣单列表
export const getListApi = (data: ListParams): Promise<Response<Row>> => {
  return request.post({ url: '/picking/line/list', data })
}

// 分拣单详情
export const detailsApi = (data): Promise<Response<Row>> => {
  return request.post({ url: '/picking/line/details', data })
}

// 分拣单下载
export const lineDowApi = (params): Promise<IResponse<string[]>> => {
  return request.get({ url: '/picking/line/dow', params })
}

// 分拣单打印
export const linePrintApi = (params): Promise<IResponse<string[]>> => {
  return request.get({ url: '/picking/line/print', params })
}
